package com.atguigu.gmall.list.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * projectName: gmall
 *
 * @author: 陈鹏
 * time: 2022/10/3 12:56 星期一
 * description: 商品搜索相关的feign接口
 */
@FeignClient(name = "service-list",path = "/api/goods",contextId = "goodsFeign")
public interface GoodsFeign {

    /**
     * 根据skuId将数据库商品新增至ES
     * @param skuId
     * @return
     */
    @GetMapping(value = "/add/{skuId}")
    public Boolean add(@PathVariable(value = "skuId") Long skuId);

    /**
     * 根据skuId移除ES中的商品
     * @param goodsId
     * @return
     */
    @GetMapping(value = "/remove/{goodsId}")
    public Boolean remove(@PathVariable(value = "goodsId")Long goodsId);
}
